<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
    Document   : ExamInfoPage
    Created on : 1st April2014
    Author     :Ihab Ali
-->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" >
     

    <body>

        <ui:composition template="./WEB-INF/templates/template.xhtml">

            <ui:define name="content">
                <h:form rendered="#{login.loggedIn == false}" >
                    <h2>#{messages.messageNotAuthintecated}</h2>
                    <h:commandButton action="/index?faces-redirect=true"
                                     value="#{messages.loginLabel}" />
                 </h:form>
                <h:form id="examInfoForm" rendered="#{login.loggedIn and (listControl.examModel.selectedEx != null)}">
                    <p:layout style="height: 150px;">
                        <p:layoutUnit position="center" >
                            <p:panelGrid columns="1" >
                            <p:outputLabel id="Title" value="#{listControl.examModel.selectedExam}"></p:outputLabel>
                            <p:outputLabel id="Duration" value="#{listControl.examModel.duration}"></p:outputLabel>
                            <p:outputLabel id="Discription" value="#{listControl.examModel.description}"></p:outputLabel>
                            <p:outputLabel id="Date" value="#{listControl.examModel.date}"></p:outputLabel>
                            </p:panelGrid>
                            <p:panelGrid columns="2">
                                <p:commandButton value="#{messages.BeginExam}" update="examInfoForm" action="#{listControl.examBeginListener()}"/>
                                <p:commandButton value=" #{messages.LogOut}"  action="#{listControl.logOut()}"/>
                            </p:panelGrid>
                        </p:layoutUnit>
                    </p:layout>
                </h:form>
            </ui:define>
  </ui:composition>
 </body>
</html>
